#include <ast/ast.h>

namespace ast {
  NodeVarDef::NodeVarDef(Stage stage) {
    this->stage = stage;
  }

  void NodeVarDef::dot_string(std::string & str) {
    str = R"(VarDef\n)";
    str += "iden: " + this->iden + R"(\n)";
    str += "stage: ";
    str += magic_enum::enum_name(this->stage);
  }

  void NodeVarDef::dot_accept(AstDot & ast_dot) {
    ast_dot.visit(*this);
  }

  void NodeVarDef::accept(ir::Visitor & visitor) {
    visitor.visit(*this);
  }
}
